<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script type="text/javascript">


    var a = show(prompt("输入年份"),prompt("输入月份"),prompt("输入日"));
    function show(year,month,day){
        var arr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
        var brr = 0;
        for (var i = 0; i < parseInt(month)-1; i++) {
            brr+=arr[i];
        }
        if((parseInt(year)%4==0&&parseInt(year)%100!=0)||parseInt(year)%400==0){
            brr+=1;
        }
        return brr+parseInt(day);
    }
    alert("是今年的"+a+"天");
</script>
</body>
</html>